package mxm.amfire.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import mxm.amfire.FuncFragment;
import mxm.amfire.LogoInfoTextFragment;
import mxm.amfire.LogosFragment;

/**
 * Created by zengpeijin on 2017/2/10.
 */

public class LogoInfoPagerFragmentAdapter extends FragmentPagerAdapter {
    private String titles[];
    private int res[];

    public LogoInfoPagerFragmentAdapter(FragmentManager fm,String[] titles,int res[]) {
        super(fm);
        this.titles=titles;
        this.res=res;
    }
    @Override
    public Fragment getItem(int position) {
        return LogoInfoTextFragment.newInstance(titles[position],res[position]);
    }

    @Override
    public int getCount() {
        return titles.length;
    }
}
